package com.googlecode.garbagecan.perf4jstudy.spring2;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.googlecode.garbagecan.perf4jstudy.LogParserUtil;

public class Test {

	public static void main(String[] args) throws Exception {
		String[] configs = new String[] {
				"/com/googlecode/garbagecan/perf4jstudy/spring2/spring-monitoring.xml", 
				"/com/googlecode/garbagecan/perf4jstudy/spring2/spring.xml"};
		ApplicationContext applicationContext = new ClassPathXmlApplicationContext(configs);
		
		for (int i = 0; i < 10; i++) {
			UserService userService = (UserService) applicationContext.getBean("userService");
			userService.test1();
			userService.test2();
			userService.test3();
		}

		System.out.println(LogParserUtil.parseLog2String("perf4j.log"));
	}
}
